package com.codebo.homiematch.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.codebo.homiematch.model.entity.User;
import com.codebo.homiematch.model.vo.UserVO;
import org.springframework.cache.annotation.Cacheable;


import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author 25912
 * @description 针对表【user(用户)】的数据库操作Service
 * @createDate 2025-07-17 11:56:36
 */
public interface UserService extends IService<User>
{

    @Cacheable(value = "userLoginCache", key = "#username")
    UserVO login(String username, String password, HttpServletRequest httpServletRequest);

    Long register(String username, String password, String checkPassword, List<String> tags, String nickname, int longitude, int latitude);

    List<UserVO> loveType();


    //---------------------------------------------------------------------------------

    UserVO getUserVO(User user);

    User getLoginUser(HttpServletRequest request);


}
